package SwingProbe;

import java.awt.Dimension;
import java.awt.HeadlessException;
import java.awt.Toolkit;
import javax.swing.JFrame;
import javax.swing.WindowConstants;

public class SwingFrame extends JFrame
{

    public SwingFrame() {
        Frame1();
        newFrame();
    }

    private void Frame1() {

        setTitle("MyFrame");
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
//        Toolkit tool = Toolkit.getDefaultToolkit();
//        Dimension dim = tool.getScreenSize();
//        int coordX = dim.height / 2;
//        int coordY = dim.width / 2;
        int winWidth = 300;
        int winHeight = 300;
        setBounds(0, 0, winWidth, winHeight);

    }

    private void newFrame() {
        PaintPanel paint = new PaintPanel();
        add(paint);
    }

}
